<?php 
//The progress report helped with the construction of this page

  //Build the system command that will called
    $cmd='./../perllib/Wunderbar.pl';

  // Execute the shell command
    $returnval = exec($cmd, $outputing, $result); 

  // retrieve all of the returned values and add values to anchor. output[0] and output[5] are 
  // used to delimit information in the .pl file and are not required here.
  
if($outputing[0] == "ErrorCode626") { echo "<span class=\"error\">Error: no labels found in underbar.txt.</span>"; }
elseif ($outputing[0] == "ErrorCode627") { echo "<span class=\"error\">Error: underbar.txt not found.</span>"; }
else {
  foreach ($outputing as $x) {
    $a = strtok($x, " ");
    $b = strtok("");
    echo "<a class=\"SiteLink\" href=\"$a\">$b</a>&nbsp; ";
  }
}

?>
